#pragma once

#include <iostream>
#include <unistd.h>
namespace TaskModule
{
    class Task
    {
    public:
        Task()
        {
        }
        Task(int a, int b) : x(a), y(b)
        {
        }
        void Execute()
        {
            sleep(1);//用一秒钟来模拟任务的时长
            result = x + y;
        }
        int X()
        {
            return x;
        }
        int Y()
        {
            return y;
        }
        int Result() { return result; }
        ~Task() {}

    private:
        int x;
        int y;
        int result;
    };
}